{extend name="../application/public/base.html" /}
{block name="head"}
	<link rel="stylesheet" href="ADMIN_CUSTOM/css/list.css">
	<style type="text/css">
    	.layui-card-body{
		  	min-width: 1045px;
		  	/*overflow-x: hidden !important;*/
		}
		.repair-btn{
			  width: calc(25% - 20px) !important;
			  height: 85px !important;
			  font-size: 25px !important;
			  margin-top: 10px;
			  margin-left: 0px !important;
			  margin-right: 15px !important;
			  line-height: 85px !important;
		}
		.repair-btn:nth-child(1){
		  	background: rgba(0, 204, 255, 1);
		}
		.repair-btn:nth-child(2){
		  	background: rgba(153, 102, 153, 1);
		}
		.repair-btn:nth-child(3){
		  	background: rgba(51, 51, 51, 1);
		}
		.repair-btn:nth-child(4){
		  	background: rgba(153, 0, 0, 1);
		}

		.layui-table tr td{
		  	min-width: 20px !important;
		}
		.layui-table th{
		  	min-width: 20px !important;
		}
    </style>
{/block}
{block name="body"}
    <body>
        <div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">演示</a>
            <a><cite>导航元素</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
						<div class="layui-card-body ">
                            <div class="layui-btn repair-btn" onclick="xadmin.parent_add_tab('收入记账','/finance/income/index')">
								<img src="ADMIN_CUSTOM/img/ddwxpj.png"> | 收入记账
                            </div>
                            <div class="layui-btn repair-btn" onclick="xadmin.parent_add_tab('支出记账','/finance/pay/index')">
                            	<img src="ADMIN_CUSTOM/img/ddkhsj.png"> | 支出记账
                            </div>
                            <div class="layui-btn repair-btn" onclick="xadmin.parent_add_tab('支出预算','/finance/pay/budget')">
                            	<img src="ADMIN_CUSTOM/img/dwx.png"> | 支出预算
                            </div>
                            <div class="layui-btn repair-btn" onclick="xadmin.parent_add_tab('退款记账','/finance/refund/index')">
                            	<img src="ADMIN_CUSTOM/img/wxz.png"> | 退款记账
                            </div>
                        </div>
                        <div class="layui-card-body ">
                        	<form class="layui-form layui-col-space10">
                        		<div style="display: inline-block;font-size: 16px;">财务预览</div>
						     	<div class="layui-input-inline layui-show-xs-block">
						     		<label style="padding: 0 3px 0 0;">时间</label>
								 	<div class="layui-input-inline">
									  	<input type="text" id="start" placeholder="开始日" name="start" autocomplete="off" class="layui-input">
								  	</div>
								  	<div class="layui-input-inline">
									  	<input type="text" id="end" placeholder="结束日" name="end" autocomplete="off" class="layui-input">
								  	</div>
						     	</div>
						     	<div class="layui-input-inline layui-show-xs-block">
									<label style="padding: 0 3px 0 0;">门店</label>
								 	<div class="layui-input-inline">
									  	<select name="shop_id" class="layui-select">
	                                        <option value="">所有门店</option>
	                                        {volist name="shop" id="v"}
	                                        <option value="{$v.shop_id}">{$v.shop_name}</option>
	                                        {/volist}
	                                   	</select>
								  	</div>
						     	</div>
                                <div class="layui-input-inline layui-show-xs-block">
                                    <div class="layui-btn" lay-submit="" lay-filter="search">
                                        <i class="layui-icon">&#xe615;</i></div>
                                </div>
                            </form>
                        </div>
						<div class="layui-card-body">
	                        <!-- 收入估算 start -->
	                        <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  	<ul class="wihte-title-border" style="background-color:transparent;bor">
									<li>收入估算</li>
							  	</ul>
							  	<div class="layui-tab-content">
									<table class="layui-table layui-form" id="table-shouru">
									  	
									</table>
							  	</div>
							</div>
						  	<!-- 收入估算 end -->

						  	<!-- 支出估算 start -->
	                        <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  	<ul class="wihte-title-border" style="background-color:transparent;bor">
									<li>支出估算</li>
							  	</ul>
							  	<div class="layui-tab-content">
									<table class="layui-table layui-form" id="table-zhichu">
									  	
									</table>
							  	</div>
							</div>
						  	<!-- 支出估算 end -->
						</div>
                    </div>
                </div>
            </div>
        </div> 
    </body>
{/block}
{block name="script"}
	<script type="text/javascript" src="ADMIN_CUSTOM/js/finance/finance/all_index.js"></script>
	<!-- 收入估算 -->
	<script id="table_shouru" type="text/html">
        <thead>
			<tr>
				<th>销售总收入</th>
				<th>销售待支付</th>
				<th>维修总收入</th>
				<th>维修待支付</th>
				<th>收入合计</th>
			</tr>
	  	</thead>
	  	<tbody>
			<tr>
				<td>{{d.order_money}}</td>
				<td>{{d.order_wait_money}}</td>
				<td>{{d.repair_money}}</td>
				<td>{{d.repair_wait_money}}</td>
				<td>{{d.order_repair}}</td>
        	</tr>
	  	</tbody>
    </script>
    <!-- 支出估算 -->
    <script id="table_zhichu" type="text/html">
        <thead>
			<tr>
				{{# layui.each(d, function(index2, item){ }}
				<th>{{item.cat_name}}</th>
				{{# }) }}
			</tr>
	  	</thead>
	  	<tbody>
			<tr>
				{{# layui.each(d, function(index2, item){ }}
				<td>{{item.money}}</td>
				{{# }) }}
        	</tr>
	  	</tbody>
    </script>
{/block}